Electronic device to align audio flow

ABSTRACT

An electronic device is provided that includes an input device to provide first audio signals, an output device to receive second audio signals, and logic to receive the first audio signals and to provide an audio input flow. The logic to further receive an audio output flow and to provide the second audio signals to the output device based on the audio output flow. The audio device to further align the audio input flow relative to the audio output flow.

BACKGROUND

1. Field

An embodiment may relate to adjusting an audio flow of an electronicdevice.

2. Background

The running of a processor of an electronic device (or a mobilecomputing system) may drain battery power. Electronic devices maytherefore attempt to conserve power by switching the processor intovarious low power/idle states when there are no instructions to beexecuted. The processor may be awakened to perform various operations.There is a power cost associated with the processor awakening and goinginto a sleep mode. Energy may be wasted in transitioning between a sleepmode and an active mode.

BRIEF DESCRIPTION OF THE DRAWINGS

Arrangements and embodiments may be described in detail with referenceto the following drawings in which like reference numerals refer to likeelements and wherein:

FIG. 1 shows audio input/output paths and audio input/output threads;

FIG. 2 shows an electronic device having audio paths according to anexample embodiment; and

FIGS. 3A-3B are flowcharts showing alignment of an audio input flow andan audio output flow according to an example embodiment.

DETAILED DESCRIPTION

Arrangements and embodiments may relate to an electronic device havingan audio system that includes an audio input flow (or path) and an audiooutput flow (or path). The electronic device may be a mobile phone, asmart phone, a personal digital assistant, a media player, a laptopcomputer, a notebook computer, a personal computer, a tablet, etc.

The audio input flow of the electronic device may be from an inputdevice such as a microphone, for example. The audio output flow of theelectronic device may be provided to an output device, such as a speakeror a headphone, for example.

Usage of the input device may activate the audio input flow. Usage ofthe output device may activate the audio output flow. The input devicemay also be called an audio input device. The output device may also becalled an audio output device.

The electronic device may have a communication application (such as avoice communication) that may utilize both the audio input flow and theaudio output flow. However, the audio input flow and the audio outputflow may not be processed with each other, and thus the audio input flowand the audio output flow may operate asynchronously with respect toeach other.

The audio input flow may provide interrupts to a host processor. Theaudio output flow may also provide interrupts to the host processor.However, the asynchronous execution of the audio input flow and theaudio output flow may result in each audio flow separately providinginterrupts to the host processor. This may cause the host processor toseparately service each interrupt at a different time. This may utilizeexcessive time and power of the processor. This may decrease batterylife when the processor is awakened from a sleep mode and/or an idlemode.

FIG. 1 shows audio input/output flows and audio input/output threadsaccording to an example arrangement. Other arrangements may also beprovided.

More specifically, FIG. 1 shows an audio input flow 10 having interrupts12 at a periodic rate over a period of time. FIG. 1 also shows an audiooutput flow 20 having interrupts 22 at a periodic rate over a period oftime. The audio input flow 10 may be from the input device (of theelectronic device). The audio output flow 20 may be created based on anoutput of the output device (of the electronic device). As shown in FIG.1, the interrupts 12 (of the audio input flow 10) are not synchronouswith the interrupts 22 (of the audio output flow 20). That is, theinterrupts 12 from the audio input flow 10 are not aligned with theinterrupts 22 from the audio output flow 20.

The interrupts 12, 22 may be provided to a processor to perform variousoperations based on the received interrupts. However, in systems thatinclude power management, the processor may be transitioned in a sleepmode (or an idle mode). In the sleep mode, the processor may not be infull use and/or may be shut down (or portions may be powered down). Whenthe processor receives an interrupt from a data flow (such as an audioflow), then the processor may be awaken (i.e., turned on or otherportions powered on) so as to perform an operation related to theinterrupt. After performing the necessary operation, the processor mayreturn to the sleep mode (or idle mode).

An output interrupt (related to a speaker directed audio flow) mayindicate that an audio buffer has been rendered on the output device,and the buffer is provided back to the operating system for reuse.

On the input path, the host processor may take the audio sample, performan audio enhancement (such as echo cancellation and noise reduction) andthen perform encoding. The encoding may be a compression of audio totransmit to another electronic device.

FIG. 1 also shows an audio input thread 30 related to the processorexecution of the audio input flow 10. FIG. 1 also shows an audio outputthread 40 related to the processor execution of the audio output flow20. Since the processor is awakened by the received interrupts 12, 22,the processor may operate often.

FIG. 2 shows an electronic device having audio flows (or audio paths)according to an example embodiment. Other embodiments and configurationsmay also be provided.

FIG. 2 shows an electronic device 100 that includes an audio inputdevice 110, an audio output device 120, an audio device 130 and a systemon chip 150 (or SoC). The audio input device 110 may provide the audioinput flow (or audio input path). The audio input device 110 may be amicrophone, for example. The audio output device 120 may be a speaker(or headphone port).

The audio input device 110 and the audio output device 120 may beelectrically coupled to the audio device 130. On the input side, theaudio device 130 may take samples from the audio input device 110 (suchas a microphone), convert the samples into analog to digital samples,and enhance quality of the sample. On the output side, the audio device130 may convert digital data to analog signals and drive the audiooutput device 120 (such as speakers or headphones) to render audio(i.e., voice and/or music).

The audio device 130 may be electrically coupled to the system on chip150 (or other device). The system on chip 150 may include a chipset 160and a processor 170, for example. Other components such as memory and/ordrivers may also be provided on the system on chip 150.

In at least one embodiment, the audio device 130 may include logic thatis at least partially comprising hardware logic. The logic may receivefirst audio signals and provide an audio input flow. The logic mayfurther receive second audio signals and provide an audio output flow.Logic may also align the audio input flow relative to the audio outputflow.

In at least one embodiment, the audio device 130 may include software tobe executed by hardware to perform operations, such as receive firstaudio signals and provide an audio input flow, receive second audiosignals and provide an audio output flow, and align the audio input flowrelative to the audio output flow.

The processor 170 may include a plurality of cores, such as a first core176 and a second core 178. Each core may separately perform any one ofvarious operations. Each of the cores may be separately called aprocessing entity.

The processor 170 may also include an interrupt handler 172 to handleinterrupts 12, 22 from the audio input flow 10 and the audio output flow20. The interrupt handler 172 may provide the interrupts 12, 22 (and/oradditional data) to the respective cores 176, 178. As one example, theaudio input flow 10 (and interrupts 12) may be provided to the firstcore 176, and the audio output flow 20 (and interrupts 22) may beprovided to the second core 178.

The electronic device 100 may include a power management function.During the power management operation, the processor 170 may be providedinto a sleep mode (or an idle mode) in which operations within theprocessor 170 are reduced to a minimum or even shut down. The processor170 may be awakened from the sleep mode upon receipt of an interrupt atthe interrupt handler 172. The processor 170 may then perform thenecessary operations for the interrupt(s). After performing thenecessary operations for the interrupt(s), the processor 170 may returnto the sleep mode. The processor 170 may provide the corresponding audioinput thread 30 and the corresponding audio output thread 40.

The audio device 130 may create the audio input flow 10 (and interrupts12) based on signals received by the audio input device 110. The audiodevice 130 may also create the audio output flow 20 for the audio outputdevice 120.

The audio device 130 may be a slave device that is not responsible forcreation or destruction of data flows. The audio device 130 may respondto a device driver that runs on the cores that create the audio dataflows, and the audio device 130 may respond to commands from the devicedrivers.

The audio device 130 may delay a first data flow that is created (orstarted) by the device driver, and the audio device 130 may align thefirst data flow with a second data flow.

In at least one embodiment, communication software that uses both theaudio input flow 10 and the audio output flow 20 may be used to alignthe audio input flow 10 relative to the audio output flow 20. This mayinvolve synchronizing the audio input flow 10 and the audio output flow20. The communication software may be provided within the audio device130 to align the interrupts 12 for the audio input flow 10 with theinterrupts 22 for the audio output flow 20. This may align the audioinput flow 10 relative to the audio output flow 20 such that they aresynchronous with each other. Both the interrupts are aligned and theaudio input/output flows 10, 20 are aligned since the audio flows aretimed flows (i.e., isochronous).

As one example, the communication software may delay a start of theaudio input flow 10 to be synchronized with a start of the audio outputflow 20.

As another example, the communication software may delay a start of theaudio output flow 20 to be synchronized with a start of the audio inputflow 10.

The audio input flow 10 may be an isochronous flow. Additionally, theaudio output flow 20 may be an isochronous flow. Therefore, once theaudio input flow 10 is aligned relative to the audio output flow 20, theaudio flows 10, 20 may remain aligned throughout their execution. Afteralignment, the interrupts 12 for the audio input flow 10 may occur atsame times as the interrupts 12 for the audio output flow 22.Accordingly, a number of times that the processor 170 may be awakenedmay be reduced as compared to the non-aligned audio input flow and audiooutput flow.

Execution of the audio input thread 30 may be performed on one core,such as the first core 176, simultaneously with execution of the audiooutput thread 40 being performed on another core, such as the secondcore 178.

In at least one embodiment, hardware (or hardware logic) within theaudio device 130 may align the audio input flow 10 relative to the audiooutput flow 20 when both the audio input flow 10 and the audio outputflow 20 are being used.

In another example, the hardware (or hardware logic) may delay the audioinput flow 10 to align with the audio output flow 20. In anotherexample, the hardware may delay the audio output flow 20 to align withthe audio input flow 10.

The device driver may request an input data flow or an output data flowto start (or be created). The audio device 130 may not respond, and mayoptionally start a timer that may start counting down. The timer may beprovided within the audio device 130, for example.

The audio device 130 may wait until the timer counts down and if a newdata flow in an opposite direction is started before the timer expires,then the audio device 130 may respond for both data flows at a same timeand may initiate/create those on the audio device 130 at a same clockcycle.

If the timer expires and another data flow is not initiated, then theaudio device 130 may start a single flow.

A method may now be described of hardware alignment of an audio inputpath and an audio output path according to an example embodiment. Otherembodiments and operations may also be used.

In at least one embodiment, an audio input path (or audio input flow)may be enabled. An audio path being enabled may be a request to createan audio data path. Subsequently, a determination may be made regardingwhether an audio output path (or audio input flow) is enabled.

If the determination is that the audio output path is not enabled, thenthe audio output path may be enabled. On the other hand, thedetermination is that the audio output path is enabled, then a start ofthe audio input path may be delayed. The delayed start of the audioinput path may be aligned relative to the audio output path (as long asthe delayed start does not exceed a start time requirement). After thealignment, the audio input path may be enabled.

In at least one embodiment, an audio output path may be enabled.Subsequently, a determination may be made regarding whether the audioinput path is enabled.

If the determination is that the audio input path is not enabled, thenthe audio input path may be enabled.

On the other hand, if the determination is that the audio input path isenabled, then a start of the audio output path may be delayed. Thedelayed start of the audio output path may be aligned relative to theaudio input path (as long as the delayed start does not exceed a starttime requirement). After the alignment, the audio output path may beenabled.

FIG. 3A is a flowchart showing alignment of an audio input flow and anaudio output flow. FIG. 3A may relate to starting an input data flow tobe issued to an audio device according to an example embodiment. Otherembodiments and operations may also be provided.

More specifically, FIG. 3A shows an audio input flow is created (orstarted) in operation 302. A determination may be made in operation 304whether an audio output path start request is pending in operation 304.If the output path start request path is pending (i.e., a Yesdetermination), then the output path and the input path may be alignedand started simultaneously in operation 305.

If the output path start request path is not pending in operation 304(i.e., a No determination), then in operation 306 a timer may be startedand counted down to keep the request in a pending state. In operation308, a determination may be made whether the timer expired or a newoutput path request has been made.

If the timer is determined to not have expired in operation 308 (i.e., aNo determination), then operation 306 is maintained. On the other hand,if it is determined that a new request is made to create an output flow,then the output path and the input path may be aligned and startedsimultaneously in operation 305.

On the other hand, if the timer is determined to have expired inoperation 308 (i.e., a timer expired determination), then an input pathrequest (or input flow request) may be created in operation 310.Operations may then proceed to operation 304.

FIG. 3B is a flowchart showing alignment of an audio input flow relativeto an audio output flow. FIG. 3B may relate to starting an output dataflow to be issued to an audio device according to an example embodiment.Other embodiments and operations may also be provided.

More specifically, FIG. 3B shows an audio output flow is created (orstarted) in operation 352. A determination may be made in operation 354whether an audio input path start request is pending. If the input pathstart request path is pending in operation 354 (i.e., a Yesdetermination), then the output path and the input path may be alignedand started simultaneously in operation 355.

If the input path start request path is not pending in operation 354(i.e., a No determination), then in operation 356 a timer may be startedand counted down to keep the request in a pending state. In operation358, a determination may be made whether the timer expired or a newinput path request has been made.

If the timer is determined to not have expired in operation 358 (i.e., aNo determination), then operation 356 is maintained. On the other hand,if it is determined that a new request is made to create an input flow,then the output path and the input path may be aligned and startedsimultaneously in operation 355.

On the other hand, if the timer is determined to have expired inoperation 358 (i.e., a timer expired determination), then an output pathrequest (or input flow request) may be created in operation 360.Operations may then proceed to operation 354.

The audio device 130 may perform operations based on software. Thesoftware may be provided on a machine readable medium having storedthereon a plurality of instructions executable by the electronic device100. The software may perform various operations including determiningthat a first audio data flow of the electronic device is to be enabled,determining that a second audio data flow of the electronic device is tobe enabled, and aligning the first audio data flow with the second audiodata flow. The software may align a start of the first audio data flowrelative to a start of the second audio data flow. The software mayalign interrupts for the first audio data flow with interrupts for thesecond audio data flow.

Embodiments may align an audio input flow relative to an audio outputflow such that a host processor may awaken (from a sleep or idle mode)to service both audio input flow and audio output flow at a same time.

Any reference in this specification to “one embodiment,” “anembodiment,” “example embodiment,” etc., means that a particularfeature, structure, or characteristic described in connection with theembodiment is included in at least one embodiment of the invention. Theappearances of such phrases in various places in the specification arenot necessarily all referring to the same embodiment. Further, when aparticular feature, structure, or characteristic is described inconnection with any embodiment, it is submitted that it is within thepurview of one skilled in the art to affect such feature, structure, orcharacteristic in connection with other ones of the embodiments.

Although embodiments have been described with reference to a number ofillustrative embodiments thereof, it should be understood that numerousother modifications and embodiments can be devised by those skilled inthe art that will fall within the spirit and scope of the principles ofthis disclosure. More particularly, various variations and modificationsare possible in the component parts and/or arrangements of the subjectcombination arrangement within the scope of the disclosure, the drawingsand the appended claims. In addition to variations and modifications inthe component parts and/or arrangements, alternative uses will also beapparent to those skilled in the art.

What is claimed is:
 1. An apparatus for providing audio signals,comprising logic, the logic at least partially comprising hardware logicto: receive first audio signals and provide an audio input flow; receivesecond audio signals and provide an audio output flow; and align theaudio input flow relative to the audio output flow.
 2. The apparatus ofclaim 1, wherein the logic to align the audio input flow relative to theaudio output flow at substantially a same time.
 3. The apparatus ofclaim 1, wherein the logic to align interrupts for the audio input flowwith interrupts for the audio output flow.
 4. The apparatus of claim 1,wherein the apparatus to use software to align the audio input flowrelative to the audio output flow.
 5. The apparatus of claim 1, whereinthe apparatus includes hardware to align the audio input flow relativeto the audio output flow.
 6. The apparatus of claim 5, wherein thehardware to delay a start of the audio input flow to align the audioinput flow relative to the audio output flow.
 7. The apparatus of claim5, wherein the hardware to delay a start of the audio output flow toalign the audio input flow relative to the audio output flow.
 8. Anelectronic device comprising: an input device to provide first audiosignals; an output device to receive second audio signals; and logic toreceive the first audio signals and to provide an audio input flow, thelogic to further receive an audio output flow and to provide the secondaudio signals to the output device based on the audio output flow, andthe logic to align the audio input flow relative to the audio outputflow.
 9. The electronic device of claim 8, comprising a processor havinga plurality of cores and an interrupt handler.
 10. The electronic deviceof claim 9, wherein a first one of the plurality of cores to executeinterrupt operations for the audio input flow, and a second one of theplurality of cores to execute interrupt operations for the audio outputflow.
 11. The electronic device of claim 10, wherein the logic to aligninterrupts for the audio input flow with interrupts for the audio outputflow.
 12. The electronic device of claim 8, wherein the logic to usesoftware to align the audio input flow relative to the audio outputflow.
 13. The electronic device of claim 8, wherein the logic includeshardware to align the audio input flow and the audio output flow. 14.The electronic device of claim 13, wherein the hardware to delay a startof the audio input flow to align the audio input flow relative to theaudio output flow.
 15. The electronic device of claim 13, wherein thehardware to delay a start of the audio output flow to align the audioinput flow relative to the audio output flow.
 16. A machine readablemedium having stored thereon a plurality of machine readableinstructions executable by an electronic device to perform operationsto: detect a first audio data flow of the electronic device; detect asecond audio data flow of the electronic device; and align the firstaudio data flow relative to the second audio data flow.
 17. The machinereadable medium of claim 16, the operations to further determine thatthe first audio data flow is to be enabled.
 18. The machine readablemedium of claim 17, the operations to further determine that the secondaudio data flow is to be enabled.
 19. The machine readable medium ofclaim 18, the operations to align the first audio data flow relative tothe second audio data flow when the first audio data flow is determinedto be enabled while the second audio data flow is to be enabled.
 20. Themachine readable medium of claim 16, wherein to align the first audiodata flow includes to align a start of the first audio data flow with astart of the second audio data flow.
 21. The machine readable medium ofclaim 20, wherein the operations to further: provide the start of thefirst audio data flow at a substantially same time as the start of thesecond audio data flow.
 22. The machine readable medium of claim 16,wherein the first audio data flow is an audio input flow, and the secondaudio data flow is an audio output flow.
 23. The machine readable mediumof claim 16, wherein the second audio data flow is an audio output flow,and the first audio data flow is an audio input flow.
 24. The machinereadable medium of claim 16, wherein to align the first audio data flowwith the second audio data flow includes to align interrupts for thefirst audio data flow with interrupts for the second audio data flow.